<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="lib/daterangepicker/daterangepicker.css" /> 
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>订单售后</title>
<style type="text/css">
	.s-state{}
	.s-state li{
		display: block;
	    clear: both;
	    border-bottom: solid 1px #f2f2f2;
	    margin-bottom: -1px;
	    padding: 0 20px;
	    height: 30px;
	    line-height: 30px;
	    font-size: 12px;
	    text-align: left;
	    font-weight: normal;
	    white-space: nowrap;
	}


</style>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> <a _href="welcome.html" class="fun-toindex" href="javascript:;">首页</a> <span class="c-gray en">&gt;</span> 订单管理 <span class="c-gray en">&gt;</span> 订单售后 <a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	<span class="r" style="margin-top: -2px; box-sizing: border-box;">

		<!-- <li class="dropDown dropDown_hover"><a href="#" class="dropDown_A"><button class="btn" id="statebtn">物流状态</button></a>
			<ul class="dropDown-menu radius box-shadow s-state">
				<li><label><input name="state" type="checkbox" value="0" data-name="待支付">待支付</label></li>
				<li><label><input name="state" type="checkbox" value="10" data-name="待发货">待发货</label></li>
				<li><label><input name="state" type="checkbox" value="20" data-name="已发货">已发货</label></li>
				<li><label><input name="state" type="checkbox" value="30" data-name="已收货">已收货</label></li>
				<li><label><input name="state" type="checkbox" value="40" data-name="已删除">已删除</label></li>
				<li ><label><input name="state" type="checkbox" value="43" data-name="已取消">已取消</label></li>
				<li><label><input name="state" type="checkbox" value="60" data-name="已过期">已过期</label></li>
				<li><label><input name="state" type="checkbox" value="50" data-name="退款中">退款中</label></li>
				<li><label><input name="state" type="checkbox" value="51" data-name="已退款">已退款</label></li>
				<li><label><input name="state" type="checkbox" value="44" data-name="已关闭">已关闭</label></li>
			</ul>
		</li>
		
		<div style="display:inline-block; width:380px; position:relative;">
			日期范围：
			<input name="time" type="text" id="date-range1" class="input-text datainp" style="width:300px">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</div>	

		<span style="position:relative">
			<input type="text" name="k"  placeholder="物流编号/商品名称/用户名称/手机号/备注" style="width:300px" class="input-text">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span>

		<button id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
		
		<li class="dropDown dropDown_hover"><a href="#" class="dropDown_A"><button  class="btn btn-success">导出EXCEL</button></a>
			<ul class="dropDown-menu radius box-shadow">
				<li id='exportorder'><a href="javascript:;">物流EXCEL</a></li>
				<li id='exportgoods'><a href="javascript:;">商品EXCEL</a></li>
			</ul>
		</li> -->
	</span>
</nav>
<div class="pd-10">
	
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort" id="categorylist">
			<thead>
				<tr class="text-c sort0">
					<th width="40" class="valueid"><input name="" type="checkbox" value=""></th>
					<th width="60">ID</th>
					<th width="80">订单ID</th>
					<th width="150">订单编号</th>
					
					<th width="80">联系电话</th>
					<th width="60">收货人</th>
					<th width="80">省市</th>

					<th>地址</th>
					<th width="100" class="fun-sort2" data-name="express_time" data-flag="0">更新时间</th>
					<th width="120" >金额</th>
					<th width="120">状态</th>

				</tr>
			</thead>
			<tbody id="content_sp">
				
			</tbody>
		</table>
	</div>

	<div class="cl pd-5 bg-1 bk-gray mt-10" id="operation"> 
		<!-- <a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
		<a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
		<a class="btn btn-primary radius mt-5 l mr-10" data-title="添加内容" href="javascript:;" onclick="_open('添加','product-category-add.html','50%','50%',false)" href="javascript:;">
			<i class="Hui-iconfont">&#xe600;</i> 添加
		</a> -->
		<span class="r pt-5"  style="line-height: 35px;" id="page"></span>
		<span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>
		
	</div>


</div>
<!-- 模版 -->
<script id="test" type="text/html">
<% for (x in list) { %>
	<tr class="text-c va-m sort1" >
		<td class="valueid"><input name="" type="checkbox" value="<%=list[x].express_id%>"></td>
		<td class="text-l" >
			<%=list[x].express_id%>
		</td>
		<td class="text-l" >
			<%=list[x].order_id%>
		</td>
		<td class="text-l "><%=list[x].order_number%></td>
		
		<td >
			<%=list[x].mobile%>
		</td>
		<td >
			<%=list[x].receiver%>
		</td>
		<td><%=list[x].province_name%> <%=list[x].city_name%></td>


		<td >
			<%=list[x].address%>
		</td>
		<td><%=list[x].express_time%></td>

		<td>
			<!-- <%if(list[x].total_cost>0){%><%=list[x].total_cost%>+<%}%><%=list[x].total_quan%>券<br>运费：<%=list[x].total_transport%>元 -->
			金额：<%=list[x].total_cost%><br>运费：<%=list[x].total_transport%><br>抵扣券：<%=list[x].total_quan%><br>
		</td>
		<td class="td-indexshow">
			<%=list[x].express_state_cn%>
		</td>


		
	</tr>

<%}%>
</script>


<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/moment.min.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/jquery.daterangepicker.js"></script>
<script src="/Manage/js/lazyload.min.js"></script>
<script type="text/javascript">
var API=API_ORDER_TRANSPORT;
var kk=API_ORDER_TRANSPORT;
var orderby='';
var search='';
var uid=getUrlParam('uid');//用户详情查询使用
if(uid!==null && uid!==undefined){
	API=API+'?uid='+uid;
	// $("nav").hide();
 //    $("#operation").hide();
}

loaddata(API,1,true);
// $('#date-range1').dateRangePicker({
// 	startOfWeek: 'monday',
// 	separator : ' 至 ',
// 	format: 'YYYY-MM-DD HH:mm',
// 	autoClose: true,
// 	time: {
// 		enabled: true
// 	},
// 	defaultTime: moment().startOf('day').toDate(),
// 	defaultEndTime: moment().endOf('day').toDate()
// });




	$(document).on('click','#search',function(){
		kk=API+"?";
		var state='';
		var name='状态：';
		$("input[name='state']:checked").each(function(){ 		
			state += $(this).val()+',';
			name+=$(this).data("name")+','; 		
		})
		$("#statebtn").html(name);

		var param=[
			'k='+encodeURI(document.querySelector('input[name=k]').value),
			'state='+state,
			'time='+document.querySelector('input[name=time]').value,
		];
		search=param.join('&');
	    kk=kk+search+'&'+orderby;
		loaddata(kk,1);

		
	})

	$(document).on('click','#exportorder',function(){
		var state='';
		$("input[name='state']:checked").each(function(){ 		
			state += $(this).val()+',';		
		})
		var param=[
			'k='+encodeURI(document.querySelector('input[name=k]').value),
			'state='+state,
			'time='+document.querySelector('input[name=time]').value,
		];
		param=param.join('&');
		window.open(API_EXPORT_ORDER+'?'+param+'&'+orderby);
		console.log(API_EXPORT_ORDER+'?'+param+'&'+orderby)
	})

	$(document).on('click','#exportgoods',function(){
		var state='';
		$("input[name='state']:checked").each(function(){ 		
			state += $(this).val()+',';		
		})
		var param=[
			'k='+encodeURI(document.querySelector('input[name=k]').value),
			'state='+state,
			'time='+document.querySelector('input[name=time]').value,
		];
		param=param.join('&');
		window.open(API_EXPORT_ORDERGOODS+'?'+param+'&'+orderby);
		console.log(API_EXPORT_ORDERGOODS+'?'+param+'&'+orderby)
	})

</script>

</body>
</html>